// API 响应基础接口
export interface ApiResponse<T = any> {
  code: number
  message: string
  data: T
}

// 聊天相关接口
export interface Message {
  role: 'user' | 'assistant'
  content: string
}

export interface ChatRequest {
  messages: Message[]
  temperature?: number
  max_tokens?: number
}

export interface ChatResponse {
  choices: {
    message: {
      content: string
      role: string
    }
    finish_reason: string
  }[]
  usage: {
    prompt_tokens: number
    completion_tokens: number
    total_tokens: number
  }
}

// 提示词生成相关接口
export interface PromptRequest {
  text: string
  prompt_type: 'normal' | 'master'
  temperature?: number
  max_tokens?: number
}

export interface PromptResponse {
  original: string
  enhanced: string
  mode: string
}

// 用户设置相关接口
export interface UserSettings {
  apiKey: string
  temperature: number
  maxTokens: number
}

// 错误响应接口
export interface ApiError {
  code: number
  message: string
  details?: any
} 